namespace Baula.TextGen.ActiveTemplating
{
    public interface IContext
    {
        DefaultContext DefaultContext { get; }
        IFormsContext Forms { get; }
        ITablesContext Tables { get; }
    }

    public class Context : IContext
    {
        private readonly DefaultContext _defaultContext;
        private readonly IFormsContext _formsContext;
        private readonly ITablesContext _tablesContext;

        public Context(DefaultContext defaultContext, IFormsContext formsContext, ITablesContext tablesContext)
        {
            _defaultContext = defaultContext;
            _tablesContext = tablesContext;
            _formsContext = formsContext;
        }

        public DefaultContext DefaultContext
        {
            get { return _defaultContext; }
        }

        public IFormsContext Forms
        {
            get { return _formsContext; }
        }

        public ITablesContext Tables
        {
            get { return _tablesContext; }
        }

        // Setter used mainly in VB.NET code created in runtime
// ReSharper disable UnusedAutoPropertyAccessor.Global
        public int IntegerDebugOutput { get; set; }
// ReSharper restore UnusedAutoPropertyAccessor.Global
    }
}